<!DOCTYPE html><html><head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta content="telephone=no" name="format-detection">
    <title>我的兑换礼品</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/normalize.min.css?t=20151016">
    <link rel="stylesheet" href="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/records-list-v1201.css?t=20151201">
   	<style>
        .tooltip{color: #55acee;padding: 2px 5px;display:inline-block;background-color: #fff;border: solid #55acee 1px;font-size: 10px;position: relative;border-radius: 2px;font-style: normal;margin-left: 8px;}
        .tooltip::after{content: '';display: block;position: absolute;left:-5px;top:50%;margin-top:-3px;border: solid transparent 3px; border-right-color:#fff; }
        .tooltip::before{content: '';display: block;position: absolute;left:-6px;top:50%;margin-top:-3px;border: solid transparent 3px; border-right-color:#55acee; }
   	</style>
</head>
<body style="line-height:20px;">


{if $olist==1}
<style>html{height:100%;}body{height:100%;}</style>
		<div class="noRecord">
		 	<img src="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/noRecord.png"/>
		     <p>还没有您的记录哦~</p>
		     <p>快进行第一次兑换吧！</p>
		     
		        <a href="{php echo $this->createMobileUrl('goods')}" class="goHome">去兑换</a>
		     
</div>
{else}

<div id="db-content">
		<link rel="stylesheet" href="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/simple-v12.14.css">
    <div class="banner">
        <div class="banner-swipe">
            <div>
               {loop $ad $item}
                <a href="{$item['url']}"><img alt="{$item['title']}" src="{php echo (strpos($item['pic'], 'http://') === FALSE) ? $_W['attachurl'].$item['pic'] : $item['pic']}"/></a>
                {/loop}
            </div>
        </div>
        <div class="banner-position"></div>
    </div>
<script>
    $('.banner-swipe').children('div').height($('body').width()*280/640)
</script>

<div class="top">
    <div class="credits">
        <i></i><span>{if $cfg['hztype']<>''}{$cfg['hztype']}{else}积分{/if}</span><span class="theme-color" id="db-credits-num">{php echo number_format($credit)}</span>
    </div>
    <a href="{php echo $this->createMobileUrl('goods')}" class="records">
        <i class="note"></i><span>{if $cfg['hztype']<>''}{$cfg['hztype']}{else}积分{/if}商城</span><i id="db-new-record"></i>
    </a>
</div>
{loop $goods_list $item}

        <div class="records-list">
                <div class="record-group ">
                    <img src="{php echo strpos($item['logo'], 'http://') === FALSE ? $_W['attachurl'] . $item['logo'] : $item['logo']}">
                    <div class="item-info">
                        <h2><span>{$item['title']}</span> {if $item['status'] == 'done'}<span style="color:#cccccc">已领取</span>{else}<span style="color:#EE0000">未领取</span>{/if}</h2>
                        <p><span>价值：{$item['price']}元<br>兑换日期：{php echo date('Y-m-d H:i:s', $item['createtime'])}<br>兑换消耗{if $cfg['hztype']<>''}{$cfg['hztype']}{else}积分{/if}:-{$item['cost']}</span></p>
                       {if $item['type']== 4}
                        <p><span><a href="{$item['dj_link']}" style="background:#BF3EFF;border:1px #BF3EFF solid; display:block;padding:6px;color:#ffffff">点击领取优惠券</a></span></p>
                       {/if}
                       {if $item['type']==1}
                       <p><span>兑换人： {$item['realname']}<Br>联系电话： {$item['mobile']}<br>收件地址： {$item['residedist']}</span></p>
                       {else if $item['type']==2}
                       <p><span>手机电话： {$item['mobile']}</span></p>
                       {else if $item['type'] == 0}
                       <p><span>支付宝： {$item['alipay']}</span></p>
                       {/if}
                       {if "" != $item['note']}<p><span>备注： {$item['note']}</span></p>{/if}

                       {if $item['type']== 3}
                         {if !$item['status']}
                         <p><span style="font-size:14px; color:#ff0000">请输入消费密码(向店员索要)<Br>
                         <form class="form-horizontal form" id="form1" action="{php echo $this->createMobileUrl('hexiao')}" method="post">
                           <input type="password" name="password" id="password" value="" style="width:93%;height:30px;border:1px #cecece solid">
                           <input type="hidden" name="nickname" id='nickname' value="{$fans['nickname']}" />
                           <input type="hidden" name="openid" id='openid' value="{$fans['openid']}" />
                           <input type="hidden" name="goodid" id='goodid' value="{$item['id']}" />
                           <input type="hidden" name="goodname" id='goodname' value="{$item['title']}" />
                           <input type="submit"  name="submit" id='submit' value='确认使用' style="width:93%;background:#4169E1;font-size:16px;color:#ffffff;margin-top:5px;height:35px;" />
                         </form>
                         </span></p>   
                        
                         {/if}
                       {/if}

                    </div>
                 </div>

        </div>
 {/loop}
 {/if}
 	<script src="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/zepto.min.js"></script>
    <script src="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/swipe.min.js?t=20151012"></script>
<script src="{$_W['siteroot']}addons/tiger_jifenbao/template/mobile/goods/css/zepto.lazyload.min.js?20140929"></script>
<script>
$(function(){
    //banner
    var $swipe=$('.banner-swipe'),
        $swipeWrap=$swipe.children('div'),
        $swipePosition=$('.banner-position'),
        length=$swipeWrap.children('a').length;
    if(length>1){
        var swipePosition='';
        $swipeWrap.children('a').wrap('<div></div>');
        for(i=0;i<length;i++){
            if(i==0){
                swipePosition+='<li class="cur"></li>';
            }else{
                swipePosition+='<li></li>';
            }
        }
        $swipePosition.append(swipePosition);
        var bullets = $swipePosition.children('li');
        window.bannerSlider =  Swipe(document.getElementsByClassName('banner-swipe').item(0), {
                        auto: 3000,
                        startSlide: 0,
                        continuous: true,
                        disableScroll:false,
                        callback: function(index) {
                            if((index+1)>bullets.length){
                                index=index%2;
                            }
                            bullets.attr('class','').eq(index).attr('class','cur');
                        }
                    });
    }
    else{
        $swipe.css('visibility','visible');
    }
    $(".items img").lazyload({ threshold : 500 });
    //icon宽度自适应
    if($('.icons a').length<4){
        $('.icons a').css('width',(100/$('.icons a').length)+'%')
    }
    //item图片自适应高度
    var imgWidth=($('.items').width()-41)/2;
    $('.items img').css('height',imgWidth*225/225)
})
</script>
</body>
</html>